import sys

def trace(fun):
	def callFun(*args,**kwargs):
		print "calling begin...%s,%s,%s\n"%(fun.__name__,args,kwargs)
		r = fun(*args,**kwargs)
		print "calling end...%s,%s,%s\n"%(fun.__name__,args,kwargs)
		return r
	return callFun

@trace
def squre(x):
	print "squre of x : %d"%(x*x)

if __name__ == "__main__":
	res = squre(99)


	